<%-- 
    Document   : main
    Created on : 2016-6-28, 9:55:47
    Author     : 52461
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

        <link rel="stylesheet" href="css/paper.css" media="screen">
        <link rel="stylesheet" href="css/main.css" media="screen">
        <link rel="stylesheet" href="css/font-awesome.css" media="screen">
        <link rel="icon" href="favicon.ico" type="image/x-icon">

        <script type="text/javascript" src="js/jquery-1.9.1.js"></script>
        <script type="text/javascript" src="js/bootstrap.min.js"></script>
        <script type="text/javascript" src="js/angular/angular.js"></script>
        <title>绰曦互动LIS</title>
    </head>
    <body ng-app='mainApp' ng-controller="mainCtrl" style="overflow-y: hidden"  ng-class="{ 'app-aside-folded':app.asideFolded}">
        <div data-ng-include="'tpl/header.html'" class="app-header navbar">

        </div>
        <div class="app-aside hidden-xs bg-dark" ng-class="{'app-aside-show':app.asideshow}" data-ng-include="'tpl/left.html'">

        </div>
        <div class='app-content'>
            <iframe  src="" id="iframepage" name="iframepage" frameBorder=0 scrolling=auto width="100%"  ></iframe>


        </div>
    </body>
</html>
<%

%>
<script>

    angular.module("mainApp", [])
            .controller("mainCtrl", function ($scope) {
                $scope.name = "<%=request.getSession().getAttribute("name")%>";
                $scope.app = {};
                 
                $scope.openView = function (url) {

                    $("#iframepage").attr("src", url);
                }
                $scope.hideside = function () {
                    if ($scope.app.asideFolded) {
                        $scope.app.asideFolded = false;
                        // $scope.app.asideshow =true;
                        
                    } else {
                        $scope.app.asideFolded = true;
                       // $scope.app.asideshow =false;
                    }
                }

                $scope.logout = function () {
                    location = "${base}/";
                }


                $scope.openView('view/host');
            });


    function autoHeight() {
        var bHeight = $('body').height();
        console.log(bHeight);

        $("#iframepage").height(bHeight - 52);
    }
    autoHeight();


    $(window).resize(function () {
        autoHeight();
    });

</script>
